import { Component, OnInit, Input } from "@angular/core";

@Component({
  selector: "app-icon-star",
  templateUrl: "./icon-star.component.html",
  styleUrls: ["./icon-star.component.scss"]
})
export class IconStarComponent implements OnInit {
  @Input()
  ttype: string;
  @Input()
  tstyle: any;
  solidStar =
    "M957.111079 403.480424c-3.927449-11.669784-14.447037-19.86442-26.723641-20.816095L647.68068 360.749204 540.183388 84.126003c-4.586458-11.803837-15.951297-19.579941-28.614711-19.579941s-24.02723 7.776104-28.614711 19.579941L375.458719 360.749204l-282.708803 21.915126c-12.276604 0.951675-22.796192 9.146311-26.723641 20.816095-3.927449 11.669784-0.50142 24.557302 8.701173 32.737612l217.547735 193.358823-67.980277 291.298436c-2.848884 12.20702 2.009773 24.919553 12.273535 32.114418 10.264784 7.195889 23.87271 7.42818 34.375925 0.586354l240.624313-156.709111 240.625336 156.709111c5.099135 3.320629 10.92891 4.974291 16.752546 4.974291 6.173606 0 12.342096-1.858324 17.623379-5.561669 10.263761-7.194866 15.122419-19.907399 12.273535-32.114418l-67.980277-291.299459L948.409906 436.218036C957.613522 428.037726 961.037505 415.150208 957.111079 403.480424z";
  emptyStar: "M959.008 406.016l-308-47.008L512 64 372.992 359.008l-308 47.008 223.008 228-52.992 324L512 805.024l276.992 152.992-52.992-324zM512 740L304 856.992l40-235.008-179.008-182.016 242.016-32 104.992-224 104 224 240.992 34.016L680 622.976l36.992 235.008z";
  get d() {
    if (this.ttype === "empty") {
      return this.emptyStar;
    }
    if (this.ttype === "solid") {
      return this.solidStar;
    }
    return this.emptyStar;
  }
  constructor() {}

  ngOnInit() {}
}
